package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Question;
import cn.wolfcode.luowowo.common.query.QuestionQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Question record);

    Question selectByPrimaryKey(Long id);

    List<Question> selectAll();

    List<Question> selectForList(QuestionQueryObject qo);

    int updateByPrimaryKey(Question record);

    int getAnswerNum(Long id);

    void incrAnswernum(@Param("num") int num, @Param("id") Long id);

    void updateStatus(@Param("id") Long id, @Param("status") int status);

}